<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core">

    <ui:composition template="/templates/template_admin.xhtml">
        <ui:define name="content">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h1><h:outputText value="Create CV"/></h1>
                <h:panelGrid columns="2">
                    <h:outputLabel value="cvid" for="cvid" />
                    <h:inputText id="cvid" value="#{cvmb.cv.cvid}" required="true" requiredMessage="sdsdfsfsd"/>
                    <h:outputLabel value="vacancyID" for="vacancyID" />
                    <h:selectOneMenu id="vacancyID" value="#{cvmb.vacancyID}" >                        
                        <f:selectItems var="v" value="#{vmb.vacancyList()}" itemLabel="#{v.title}" itemValue="#{v.vacancyID}"/>                       
                    </h:selectOneMenu>           
                    <h:outputLabel value="ApplicantID" for="applicantID" />
                    <h:selectOneMenu id="applicantID" value="#{cvmb.applicantID}"  >   

                        <f:selectItems var="a" value="#{amb.applicantList()}" itemLabel="#{a.firstName} #{a.lastName}" itemValue="#{a.applicantID}"/>                  
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandButton action="#{cvmb.addcv()}" value="Create" />
                <br />
                <h:commandButton action="List" value="Back"/>
                <br />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
